﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace OConf.Entity
{
    public class ProjectInfoEntity
    {
        /// <summary>
        /// id
        /// </summary>
        [Key, Column(TypeName = "varchar(50)"), Required, MaxLength(50)]
        public string ID { get; set; }

        /// <summary>
        /// 项目名称
        /// </summary>
        [Column(TypeName = "varchar(50)"), Required, MaxLength(50)]
        public string ProjectName { get; set; }

        /// <summary>
        /// 项目描述
        /// </summary>
        [Column(TypeName = "varchar(200)"), Required, MaxLength(200)]
        public string ProjectDescription { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Column(TypeName = "datetime"), Required]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        [Column(TypeName = "tinyint(1)"), Required]
        public bool IsDelete { get; set; }

        /// <summary>
        /// 最后一次发布时间（单位：毫秒）
        /// </summary>
        [Column(TypeName = "bigint"), Required]
        public long LastPublishTime { get; set; }

        /// <summary>
        /// 是否保护
        /// </summary>
        [DefaultValue(false), Column(TypeName = "tinyint(1)"), Required]
        public bool IsProtect { get; set; }

        /// <summary>
        /// 秘钥
        /// </summary>
        [Column(TypeName = "varchar(32)"), Required, MaxLength(32)]
        public string SecretKey { get; set; }
    }
}
